<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model.lazy="txt">
        <input v-model.trim="text">
        <p>{{txt}}</p>
        <pre>{{text}}</pre>
        <hr>

        <a href="http://www.baidu.com" target="_blank" @click.prevent='linkClick'>百度一下</a>

        <hr>
        <input type="text" @keyup.13.left.right='keyupHandle' v-model="text" autofocus>
    </div>
    <script src="vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                txt:'',
                text:''
            },
            methods:{
                linkClick:function(e){
                    // e.preventDefault()
                },
                keyupHandle:function(e){
                   alert(this.text)
                }
            }
        })
    </script>
</body>
</html>